package com.A21MobileSales;

import java.util.ArrayList;
 

import android.app.Activity;
import android.content.Context;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuItem;

 

public class OrderActionBarCallBack implements ActionMode.Callback {
	 
	private int SelectedCnt;
	private Context context;
	public OrderActionBarCallBack(Activity _activity,int _SelectedCnt){ 
		SelectedCnt=_SelectedCnt;
		context=_activity;
	}
	
    @Override
    public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
        // TODO Auto-generated method stub 
    	OrderSummary activity = (OrderSummary) context;
    	activity.DeleteSelection();
        return false;
    }

    @Override
    public boolean onCreateActionMode(ActionMode mode, Menu menu) {
        // TODO Auto-generated method stub
        mode.getMenuInflater().inflate(R.menu.contextual_menu_cart, menu);
        return true;
    }

    @Override
    public void onDestroyActionMode(ActionMode mode) { 
    } 
    @Override
    public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
        // TODO Auto-generated method stub 
    	mode.setTitle(SelectedCnt + " selected");  
        return false;
    }

}